<?php
/**
 * Return instance of the core or its property if provided
 *
 * @param	string	$prop
 * @return	object
 */
function core($prop = false)
{
	$c = "\core\Core";

	//A little bit of govnokod
	//Calling pattern class instead of a core class
	if ($prop == "Registry")
	{
		return $c::GetInstance()->NewObject("\patterns\\Registry");
	}

	if ($prop)
	{
		return $c::GetInstance()->GetObject($prop);
	}
	else
	{
		return $c::GetInstance();
	}
}